Component({
  data: {
    selected: 0,
    color: "#414141",
    selectedColor: "#00726D",
    backgroundColor: "#fff",
    list:[{
      "pagePath": "/pages/home/index/index",
      "text": "首页",
      "iconPath": "/images/tab_index.png",
      "selectedIconPath": "/images/tab_index1.png"
    },
    {
      "pagePath": "/pages/interrogation/interrogation",
      "text": "问诊",
      "iconPath": "/images/tab_wz.png",
      "selectedIconPath": "/images/tab_wz1.png"
    },
    {
      "pagePath": "/pages/shop/index/index",
      "text": "商城",
      "iconPath": "/images/tab_shop.png",
      "selectedIconPath": "/images/tab_shop1.png"
    },
    {
      "pagePath": "/pages/task/index/index",
      "text": "任务",
      "iconPath": "/images/tab_rw.png",
      "selectedIconPath": "/images/tab_rw1.png"
    },
    {
      "pagePath": "/pages/my/index/index",
      "text": "我的",
      "iconPath": "/images/tab_my.png",
      "selectedIconPath": "/images/tab_my1.png"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      // this.setData({
      //   selected: data.index
      // })
    }
  }
})